/*
 * defs.h
 *
 * 		Defines for various parameters of the synthesizer
 *
 */

#ifndef DEFS_H_
#define DEFS_H_

#include <stdint.h>
#include <stdbool.h>

#define twoPI			6.2831853					// pi times 2
#define PI				3.1415926					// pi
#define sampleRate		40000						// sample rate of synthesizer
#define bufferSize		128							// output buffer size
#define tableSize 		1024						// size of wavetable
#define tableFreq		(sampleRate / tableSize)	// frequency of one wavetable period
#define FIFO_BUFFER_SIZE 32							// MIDI buffer size

// MIDI UART
#define MIDI_UART (LPC_UART_TypeDef *)LPC_UART1

// note struct
typedef struct note_s{
	uint8_t noteID;
	float frequency;
	float velocity;
}note_s;

#endif /* DEFS_H_ */
